<template>
    <a-popover :title="fileName" >
            <div slot="content" style="text-align:center">
                <a @click="handleDown()">
                    <a-icon type="cloud-download"/>
                    下载
                    <AkFileDown :url="url" ref="AkFileDown"/>
                </a>
            </div>
              <a-icon :style="`fontSize:${imgHeight}px`" type="file-unknown"/>
             
    </a-popover> 
    
</template>
<script>
import AkFileDown from './AkFileDown'
export default {
    name:"AkUnknownPreview",
    describe:"未知文件预览",
    components:{AkFileDown},
    props:{
        url:{
            type:String,
            required:true
        },
        fileName:{
            type:String,
            required:false,
            default:''
        },
        imgHeight:{
            type:Number,
            required:false,
            default:50
        }
    },
    data(){
        return {}
    },
    methods:{
        handleDown(){
            this.$refs.AkFileDown.down();
        }
    }

}
</script>